package com.alogic.remote.xscript;

import com.alogic.remote.xscript.auth.*;
import com.alogic.remote.xscript.request.*;
import com.alogic.remote.xscript.response.*;
import com.alogic.remote.xscript.util.*;
import com.alogic.xscript.Logiclet;
import com.alogic.xscript.plugins.Segment;
import com.alogic.xscript.plugins.UrlAppender;
import com.alogic.xscript.plugins.UrlAppender2;

/**
 * Namespace
 * @author yyduan
 * @since 1.6.10.3
 *
 * @version  1.6.12.54 [20191212]
 * - 增加http basic认证插件
 *
 * @version 1.6.13.6 [20200629 duanyy] <br>
 * - 增加remote-get-content-length插件； <br>
 */
public class NS extends Segment{

	public NS(String tag, Logiclet p) {
		super(tag, p);
		
		registerModule("remote-request",CreateRequest.class);
		registerModule("remote-call",ExecuteRequest.class);
		registerModule("remote-call-direct",ExecuteRequestDirectly.class);
		
		registerModule("remote-by-form",ByForm.class);
		registerModule("remote-by-form2", ByForm2.class);
		registerModule("remote-by-text",ByText.class);
		registerModule("remote-by-json",ByJson.class);
		registerModule("remote-set-content-type",SetContentType.class);
		registerModule("remote-set-header",SetHeader.class);
		registerModule("remote-auth-signature", WithSignature.class);
		registerModule("remote-auth-password", WithPassword.class);
		registerModule("remote-auth-rsa", WithRSA.class);
		registerModule("remote-auth-signature2", WithAuthorizedSignature.class);
		registerModule("remote-auth-basic", WithHttpBasicAuth.class);
		
		registerModule("remote-discard",Discard.class);
		registerModule("remote-as-json",AsJson.class);
		registerModule("remote-as-text",AsText.class);
		registerModule("remote-get-content-type",GetContentType.class);
		registerModule("remote-get-header",GetHeader.class);
		registerModule("remote-get-code",GetStatusCode.class);
		registerModule("remote-get-reason",GetReason.class);
		registerModule("remote-get-content-length", GetContentLength.class);
		
		registerModule("remote-encode",Encoder.class);
		registerModule("remote-decode",Decoder.class);
		registerModule("remote-copy",Copy.class);
		registerModule("remote-copy2", Copy2.class);
		registerModule("remote-url-builder", UrlAppender.class);
		registerModule("remote-url-appender", UrlAppender2.class);
		registerModule("remote-md5",MD5.class);
	}

}
